/**
 * 回调组件,只要混入该mixin,然后自定义组件名和action方法就可以了
 */
export default {
  props: {
    options: {},
  },
  created() {
    this.callback()
      .finally(() => {
        this.$emit('done')
      })
  },
  methods: {
    callback() {
      return new Promise((resolve) => {
        this.action()
        resolve()
      })
    },
  },
  render: (h) => {
    return ''
  },
}
